package com.my.thread_pool;

import com.alibaba.fastjson.JSON;
import com.fasterxml.jackson.databind.util.BeanUtil;

import java.util.Random;

public class UserInfoDetalImpl2 extends UserInfoDeal<UserInfo, UserInfo> {

    @Override
    public void deal(UserInfo param, UserInfo result) {

        int count = param.getId() * 1000;
        System.out.println(Thread.currentThread().getName() + "   result is;" + result + "     " + System.currentTimeMillis());
        try {

            Thread.sleep(count);
            result.setName(param.getName());
            result.setCount(count);
            System.out.println(Thread.currentThread().getName() + "   end time is;" + System.currentTimeMillis());
            System.out.println("=====" + JSON.toJSONString(result));
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
